//
//  FitmentCollectionViewCell.m
//  PerfectWorld
//
//  Created by dllo on 16/9/10.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "FitmentCollectionViewCell.h"
#import "FitPhotos.h"
#import "UIImageView+WebCache.h"
@implementation FitmentCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        _mainImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
        [self.contentView addSubview:_mainImageView];
    }
    return self;
}
- (void)setPhotos:(FitPhotos *)photos {
    _photos = photos;
    NSNumber *num = photos.photo_id;
    NSString *str = num.description;
    NSString *str1 = [str substringToIndex:3];
    [_mainImageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://image.gooju.cn/images/%@/9/%@_0_9-.jpg", str1, str]] placeholderImage:nil];
   
    
}
@end
